home *** CD-ROM | disk | FTP | other *** search
- Path: news.unt.edu!news
- From: Steve Fogoros <sfogoros@hsc.unt.edu>
- Newsgroups: comp.lang.c
- Subject: Re: Problem using Double
- Date: Sun, 18 Feb 1996 23:19:24 -0800
- Organization: University of North Texas Health Science Center
- Message-ID: <3128247C.5D11@hsc.unt.edu>
- References: <4g5kbd$f2j@barnacle.iol.ie>
- NNTP-Posting-Host: sfogoros.hsc.unt.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (Win16; I)
-
- I had this problem with Borland C when I failed to include math.h and the
- compiler thought sin and cos took int args and returned int. If you
- pass int to a function expecting double, you can get a domain error.
- You will definitly corrupt the stack frame. You must also declare a
- function's return type correctly.
- --
- Steve Fogoros, Academic Information Coordinator
- University of North Texas Health Science Center
- 3500 Camp Bowie Boulevard, Fort Worth, Texas 76107-2699
- (817)-735-2162 sfogoros@hsc.unt.edu
-